<?php

class ZFPainel_View_Helper_CompLis001 extends Zend_View_Helper_Abstract
{

    public function compLis001($grid, array $options = array())
    {
        $enableSearch = true;
        $enableSearchAvancada = false;
        
        if (isset($options['enableSearch'])) {
            $enableSearch = (boolean) $options['enableSearch'];
        }
        if (isset($options['enableSearchAvancada'])) {
            $enableSearchAvancada = (boolean) $options['enableSearchAvancada'];
        }
        
        $opt2 = array(
            'grid' => $grid,
            'enableSearch' => $enableSearch,
            'enableSearchAvancada' => $enableSearchAvancada,
            'filtros' => isset($options['filtros']) ? $options['filtros'] : array('q' => ''),
        );
        
        if (isset($options['menu'])) {
            $opt2['menu'] = 'tela/' . $options['menu'];
            if (isset($options['menu_opt'])) {
                $opt2['menu_opt'] = $options['menu_opt'];
            }
        }
        
        echo $this->view->partial('tela/comp/lis001.phtml', 'default', $opt2);
    }

}